/****************************************************************************
 *
 * Project: LPC-2478-STK
 *
 * Copyright: Ivan Vasilev, Olimex Ltd. All rights reserved.
 *
 * File: adc.h
 * Description: ADC include file
 * Developer: Ivan Vasilev, <ivan at l123.org>
 *
 * Last change: $Date: 2009/07/15 21:17:16 $
 * Revision: $Revision: 1.1 $
 * Id: $Id: adc.h,v 1.1 2009/07/15 21:17:16 felipe Exp $
 * Author: $Author: felipe $
 *
 ****************************************************************************/

#include "../lpc_config.h"


#define	ADC_CLOCK_RATE	(2*1000*1000)

#if ((ADC_CLOCK_RATE) > (4500000))
#warning "ADC clock out of range"
#endif

#define	ADC_CH_0	0
#define	ADC_CH_1	1
#define	ADC_CH_2	2
#define	ADC_CH_3	3
#define	ADC_CH_4	4
#define	ADC_CH_5	5
#define	ADC_CH_6	6
#define	ADC_CH_7	7

void 	InitADC(UNS_8 channel);
UNS_32 GetADC(UNS_8 channel);
